#ifndef __CRTSERIAL_C_H__
#define __CRTSERIAL_C_H__

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termios.h>
#include <errno.h>
#include <sys/select.h>


#ifdef __cplusplus
extern "C" {
#endif


int open_dev(const char * Dev);
int close_dev(int fd);
int set_baudrate(int fd, int baudrate);
int set_other_param(int fd, int databits, int stopbits, int parity);
int flush_dev(int fd);
int read_dev(int fd, char *buffer, int size);
int write_dev(int fd, const char *buffer, int size);
int check_dev(int fd, int timeout_sec);


#ifdef __cplusplus
}
#endif

#endif /*__CRTSERIAL_C_H__*/